﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BE= Skynet.BusinessEntities; 
using DC= Skynet.ServiceContracts.DataContracts;
namespace Skynet.ServiceImplementation.Translators
{
    public class CustomerTranslator : Infrastructure.Aspect.Services.Traslator.EntityMapperTranslator<BE.Customer, DC.DCCustomer>
    {
        protected override DC.DCCustomer BusinessToService(Infrastructure.Aspect.Services.Traslator.IEntityTranslatorService service, BE.Customer value)
        {
            var target = new DC.DCCustomer();
            target.Id = value.Id;
            target.Name = value.Name;
            target.LastName = value.LastName;
            return target;
        }
        protected override BE.Customer ServiceToBusiness(Infrastructure.Aspect.Services.Traslator.IEntityTranslatorService service, DC.DCCustomer value)
        {
            var target = new BE.Customer();
            target.Id = value.Id;
            target.Name = value.Name;
            target.LastName = value.LastName;
            return target;
        }
    }
}
